.class public Lcom/xingbook/d/a;
.super Lcn/a/a/a/b;


# static fields
.field private static d:Landroid/graphics/BitmapFactory$Options;


# instance fields
.field private b:Lcom/xingbook/xingbook/b/c;

.field private c:Z


# direct methods
.method public constructor <init>()V
    .locals 3

    const/4 v2, 0x1

    invoke-direct {p0}, Lcn/a/a/a/b;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/d/a;->c:Z

    new-instance v0, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v0}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    sput-object v0, Lcom/xingbook/d/a;->d:Landroid/graphics/BitmapFactory$Options;

    sget-object v0, Lcom/xingbook/d/a;->d:Landroid/graphics/BitmapFactory$Options;

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    iput-object v1, v0, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config;

    sget-object v0, Lcom/xingbook/d/a;->d:Landroid/graphics/BitmapFactory$Options;

    iput-boolean v2, v0, Landroid/graphics/BitmapFactory$Options;->inPurgeable:Z

    sget-object v0, Lcom/xingbook/d/a;->d:Landroid/graphics/BitmapFactory$Options;

    iput-boolean v2, v0, Landroid/graphics/BitmapFactory$Options;->inInputShareable:Z

    return-void
.end method


# virtual methods
.method public A()I
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->n()I

    move-result v0

    return v0
.end method

.method public a(Lcom/xingbook/xingbook/b/c;I)I
    .locals 4

    const/4 v0, 0x1

    invoke-virtual {p0}, Lcom/xingbook/d/a;->n()V

    iput-object p1, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    new-instance v1, Ljava/io/File;

    new-instance v2, Ljava/lang/StringBuilder;

    sget-object v3, Lcom/xingbook/c/c;->E:Ljava/lang/String;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Lcom/xingbook/xingbook/b/c;->t()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ".orf"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v1}, Lcom/xingbook/d/a;->a(Ljava/io/File;)I

    move-result v1

    if-nez v1, :cond_1

    if-ge p2, v0, :cond_0

    move p2, v0

    :cond_0
    invoke-virtual {p0, p2}, Lcom/xingbook/d/a;->d(I)V

    invoke-virtual {p1}, Lcom/xingbook/xingbook/b/c;->b()I

    move-result v0

    const/16 v2, 0x8

    if-ne v0, v2, :cond_1

    invoke-virtual {p1}, Lcom/xingbook/xingbook/b/c;->h()Lcom/xingbook/b/b;

    move-result-object v0

    if-nez v0, :cond_2

    new-instance v0, Lcom/xingbook/b/e;

    const-string v2, ""

    invoke-direct {v0, v2}, Lcom/xingbook/b/e;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/xingbook/d/a;->q()Lcn/a/a/a;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/xingbook/b/e;->a(Lcn/a/a/a;)V

    invoke-virtual {p1, v0}, Lcom/xingbook/xingbook/b/c;->a(Lcom/xingbook/b/b;)V

    :cond_1
    :goto_0
    return v1

    :cond_2
    invoke-virtual {v0}, Lcom/xingbook/b/b;->a()Z

    move-result v2

    if-nez v2, :cond_1

    check-cast v0, Lcom/xingbook/b/e;

    invoke-virtual {p0}, Lcom/xingbook/d/a;->q()Lcn/a/a/a;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/xingbook/b/e;->a(Lcn/a/a/a;)V

    goto :goto_0
.end method

.method public a(Lcom/xingbook/xingbook/b/c;Ljava/util/Locale;)I
    .locals 7

    const/4 v2, 0x0

    const/4 v0, 0x1

    invoke-virtual {p1}, Lcom/xingbook/xingbook/b/c;->n()I

    move-result v1

    if-ge v1, v0, :cond_3

    invoke-virtual {p0}, Lcom/xingbook/d/a;->p()[Lcn/a/a/f;

    move-result-object v3

    if-eqz v3, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/d/a;->p()[Lcn/a/a/f;

    move-result-object v4

    array-length v5, v4

    if-lez v5, :cond_0

    move v3, v2

    :goto_0
    if-lt v3, v5, :cond_1

    :cond_0
    :goto_1
    if-nez v2, :cond_3

    :goto_2
    invoke-virtual {p0, p1, v0}, Lcom/xingbook/d/a;->a(Lcom/xingbook/xingbook/b/c;I)I

    move-result v0

    return v0

    :cond_1
    aget-object v6, v4, v3

    invoke-virtual {v6}, Lcn/a/a/f;->a()Ljava/util/Locale;

    move-result-object v6

    invoke-virtual {v6, p2}, Ljava/util/Locale;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_2

    add-int/lit8 v1, v3, 0x1

    move v2, v0

    goto :goto_1

    :cond_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_3
    move v0, v1

    goto :goto_2
.end method

.method public a(Landroid/content/Context;)V
    .locals 0

    return-void
.end method

.method public a(Lcom/xingbook/d/b;)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-interface {p1, v0}, Lcom/xingbook/d/b;->a(Lcom/xingbook/xingbook/b/c;)Z

    return-void
.end method

.method public a(Z)V
    .locals 1

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/xingbook/d/a;->c:Z

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0, p1}, Lcom/xingbook/xingbook/b/c;->a(Z)V

    return-void
.end method

.method public b(Z)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0, p1}, Lcom/xingbook/xingbook/b/c;->f(Z)V

    return-void
.end method

.method public c(Z)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0, p1}, Lcom/xingbook/xingbook/b/c;->b(Z)V

    return-void
.end method

.method public declared-synchronized d(I)V
    .locals 1

    monitor-enter p0

    :try_start_0
    invoke-super {p0, p1}, Lcn/a/a/a/b;->d(I)V

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0, p1}, Lcom/xingbook/xingbook/b/c;->z(I)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public d(Z)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0, p1}, Lcom/xingbook/xingbook/b/c;->e(Z)V

    return-void
.end method

.method public i(I)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0, p1}, Lcom/xingbook/xingbook/b/c;->y(I)V

    return-void
.end method

.method public j(I)Landroid/graphics/Bitmap;
    .locals 4

    const/4 v0, 0x0

    if-nez p1, :cond_1

    :cond_0
    :goto_0
    return-object v0

    :cond_1
    const/4 v1, -0x1

    if-ne p1, v1, :cond_2

    invoke-virtual {p0}, Lcom/xingbook/d/a;->o()Ljava/io/InputStream;

    move-result-object v1

    move-object v2, v1

    :goto_1
    if-eqz v2, :cond_0

    const/4 v1, 0x0

    :try_start_0
    sget-object v3, Lcom/xingbook/d/a;->d:Landroid/graphics/BitmapFactory$Options;

    invoke-static {v2, v1, v3}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_1

    move-result-object v0

    :try_start_1
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0

    :cond_2
    invoke-virtual {p0, p1}, Lcom/xingbook/d/a;->e(I)Ljava/io/InputStream;

    move-result-object v1

    move-object v2, v1

    goto :goto_1

    :catch_1
    move-exception v1

    :try_start_2
    invoke-virtual {v1}, Ljava/lang/OutOfMemoryError;->printStackTrace()V

    invoke-static {}, Ljava/lang/System;->gc()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :try_start_3
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_2

    goto :goto_0

    :catch_2
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0

    :catchall_0
    move-exception v0

    :try_start_4
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_3

    :goto_2
    throw v0

    :catch_3
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_2
.end method

.method public k(I)V
    .locals 2

    sget v0, Lcn/a/a/b;->c:I

    if-eq p1, v0, :cond_0

    sget v0, Lcn/a/a/b;->b:I

    if-eq p1, v0, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/d/a;->q()Lcn/a/a/a;

    move-result-object v0

    invoke-virtual {p0, p1}, Lcom/xingbook/d/a;->h(I)Lcn/a/a/b;

    move-result-object v1

    invoke-virtual {v1}, Lcn/a/a/b;->a()[Lcn/a/a/c/a;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcn/a/a/a;->a([Lcn/a/a/c/a;)V

    :cond_0
    return-void
.end method

.method public l(I)V
    .locals 0

    return-void
.end method

.method public n()V
    .locals 0

    invoke-super {p0}, Lcn/a/a/a/b;->n()V

    return-void
.end method

.method public s()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->t()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public t()I
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->j()I

    move-result v0

    return v0
.end method

.method public u()Lcom/xingbook/b/b;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->h()Lcom/xingbook/b/b;

    move-result-object v0

    return-object v0
.end method

.method public v()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->k()Z

    move-result v0

    return v0
.end method

.method public w()Z
    .locals 1

    iget-boolean v0, p0, Lcom/xingbook/d/a;->c:Z

    return v0
.end method

.method public x()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->o()Z

    move-result v0

    return v0
.end method

.method public y()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->l()Z

    move-result v0

    return v0
.end method

.method public z()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/d/a;->b:Lcom/xingbook/xingbook/b/c;

    invoke-virtual {v0}, Lcom/xingbook/xingbook/b/c;->m()Z

    move-result v0

    return v0
.end method
